<section class="content" >
    <div class="row">
        <div class="col-xs-12">
            <div class="{{info.dataCss}}">
                <div class="box-header">
                		<table ng-if="isProject" style="margin-left: 25px;">
                			<tbody>
                				<tr style="height: 50px;">
                					<td style="width: 100px;">显示所有项目：</td>
									<td style="width: 80px">
										<switch data-ng-model="info.allProject"></switch>
									</td>
									<td style="width: 80px;" ng-if="!info.allProject">
										项目：
									</td>
									<td ng-if="!info.allProject">
										<ui-select multiple ng-model="info.projectSelect"
                                        theme="bootstrap" close-on-select="false"
                                        style="width: 200px;" title="Choose a color">
			                                <ui-select-match placeholder="Select personnel...">
			                                    {{$item.name}}
			                                </ui-select-match>
			                                <ui-select-choices repeat="i in info.projects | filter:$select.search|limitTo:15">
			                                    {{i.name}}
			                                </ui-select-choices>
			                            </ui-select>
									</td>
                				</tr>
                			</tbody>
                		</table>
                    <div class="box-header">
	                    <div class="col-xs-6" style="width: 20%;">
	                        <p class="input-group">
	                            <input clear-text="清除" close-text="关闭" current-text="今天" ng-readonly="true"
	                                   ng-model="info.startDate" type="text" class="form-control" uib-datepicker-popup
	                                   is-open="startDate" placeholder="开始时间" ng-required="true" close-text="Close"/>
	                            <span class="input-group-btn">
	                                <button type="button" class="btn btn-default" ng-click="startDate=!startDate"><i
	                                        class="glyphicon glyphicon-calendar"></i></button>
	                            </span>
	                        </p>
	                    </div>

	                    <div class="col-xs-6" style="width: 20%;">
	                        <p class="input-group">
	                            <input clear-text="清除" close-text="关闭" current-text="今天" ng-readonly="true"
	                                   ng-model="info.endDate" type="text" class="form-control" uib-datepicker-popup
	                                   is-open="endDate" placeholder="结束时间" ng-required="true" close-text="Close"/>
	                            <span class="input-group-btn">
	                                <button type="button" class="btn btn-default" ng-click="endDate=!endDate"><i
	                                        class="glyphicon glyphicon-calendar"></i></button>
	                            </span>
	                        </p>
	                    </div>
	                    仅显示失败记录：<switch data-ng-model="info.failureRecord"></switch>
	                    <button class="btn btn-default" style="margin-left: 4%;" data-ng-click="search();">查询</button>
	                </div>
                </div>
                <div class="box-body" style=" ">
                                <table class="table table-hover table-bordered text-center">
                <thead>
                    <tr>
                        <th style="width: 20%">项目</th>
                        <th>时间</th>
                        <th>执行人</th>
                        <th>ucloud ip</th>
                        <th>执行用例</th>
                        <th>用例数</th>
                        <th>通过数</th>
                        <th>失败数</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="i in info.recordList |filter:filter|paging:page.index:page.size">
                        <td>
                            {{i.plan_name}}
                        </td>
                        <td>
                            {{i.create_time |date:'yyyy-MM-dd HH:mm:ss':'UTC'}}
                        </td>
                        <td>
                             {{i.creater_realname}}
                        </td>
                        <td>
                             {{i.agent_ip}}
                        </td>
                        <td>{{i.root_case}}</td>
                        <td>{{i.total}}</td>
                        <td>{{i.success}}</td>
                        <td><span style="color: red;" ng-if="i.fail!=0">{{i.fail}}</span><span ng-if="i.fail==0">{{i.fail}}</span></td>
                        <td>
                            <a href="javascript:void(0);" ng-click="open(i)">查看详情</a>
                        </td>
                    </tr>
                </tbody>
            </table>
                </div>
            <uib-pagination total-items="info.recordList|filter:filter|size" ng-model="page.index" 
                max-size="5"
                previous-text="上一页"
                next-text="下一页"
                first-text="首页"
                last-text="尾页"

                items-per-page="page.size"

                class="pagination-sm pull-right" boundary-links="true"></uib-pagination>
            </div>
        </div>
    </div>
</section>